home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 27 / 027.d81 / t.strings menu < prev    next >
Text File  |  2022-08-26  |  2KB  |  104 lines

  1.  
  2.  
  3.           STRINGS ATTACHED
  4.                  by
  5.            Matthew Oldham
  6.  
  7.  
  8. COMMODORE POWER/PLAY MAGAZINE
  9. August/September, 1986
  10.  
  11.  
  12.   "It's a lovely day in the
  13.  
  14. neighborhood....  Why, hello, boys and
  15.  
  16. girls!  Today we're going to explore
  17.  
  18. two programs that demonstrate an
  19.  
  20. important programming technique--
  21.  
  22. string concatenation.
  23.  
  24.  
  25.   "Can you say 'con-CAT-e-NA-tion'?  I
  26.  
  27. knew that you could...."
  28.  
  29.                  ***
  30.  
  31.   String concatenation allows you to
  32.  
  33. combine two or more different strings
  34.  
  35. into a single string (A$=B$+C$) or
  36.  
  37. expand an existing string with another
  38.  
  39. string (A$=A$+B$).  When you deal with
  40.  
  41. data having repetitive elements, this
  42.  
  43. technique saves programming space and
  44.  
  45. running time.
  46.  
  47.  
  48.   Oldham's HANGMAN II program
  49.  
  50. ("Strings-2") demonstrates string
  51.  
  52. concatenation.  Words are constructed
  53.  
  54. of repetive elements.  HANGMAN II
  55.  
  56. takes a list of these word parts, then
  57.  
  58. reassembles the puzzle's words through
  59.  
  60. the use of string concatenation.
  61.  
  62.  
  63.   The "Strings-1" program shows that
  64.  
  65. the string concatenation also works
  66.  
  67. with graphic and graphic command
  68.  
  69. strings.  The vertical bar graph that
  70.  
  71. you see was produced by the
  72.  
  73. "Strings-1" program using string
  74.  
  75. concatenation.  (You cannot interact
  76.  
  77. directly with this progam.)
  78.  
  79.                  ***
  80.  
  81.   As you've probably guessed, there is
  82.  
  83. more to "string concatenation" than
  84.  
  85. we've dealt with here.  If you are
  86.  
  87. interested in learning more about this
  88.  
  89. programming technique and its use in
  90.  
  91. the two programs presented here,
  92.  
  93. consult Matthew Oldham's article in
  94.  
  95. the Commodore magazine cited above.
  96.  
  97. DISK FILES USED:
  98.  
  99. STRINGS MENU
  100. STRINGS.1
  101. STRINGS.2
  102.  
  103. -----------< end of text >------------
  104.